package com.example.exampleproject.view

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.example.exampleproject.R
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch

class TestActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        GlobalScope.launch {
            testFunction()
        }
        println(Thread.currentThread())
    }


    private suspend fun testFunction() {
        delay(1000)
        println(Thread.currentThread())
    }

}